<!DOCTYPE html>
<html>
    <head>
        <title>Bootstrap 表格</title>
        <meta charset="utf-8">
         <!-- 适应移动设备 -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="./css/bootstrap.css">
        <script src="./jquery-3.5.1.min.js"></script>
        <script src="./js/bootstrap.js"></script>
    </head>
    <body>
        <div class="container">
            <h2>图像</h2>
            <p>创建响应式图片(将扩展到父元素)。 另外：图片以椭圆型展示：</p>  
            <!-- circle:原型 -->
            <img id="test" src="./img/2.jpg" class="img-responsive img-circle" alt="Cinque Terre" width="150" height="150"> 
        </div>
    </body>
    <script>
        window.onload=function(){
            setInterval(function(){
                var img = './img/'+Math.ceil(Math.random()*2)+".jpg";
                console.log(img);
                document.getElementById('test').src=img;
            },3000);
        }
    </script>
</html>